import request from '@/utils/request'

// 查询专业培养方案列表
export function listTrainingProgram(query) {
  return request({
    url: '/train/trainingProgram/list',
    method: 'get',
    params: query
  })
}

// 查询专业培养方案详细
export function getTrainingProgram(id) {
  return request({
    url: '/train/trainingProgram/' + id,
    method: 'get'
  })
}

// 新增专业培养方案
export function addTrainingProgram(data) {
  return request({
    url: '/train/trainingProgram',
    method: 'post',
    data: data
  })
}

// 修改专业培养方案
export function updateTrainingProgram(data) {
  return request({
    url: '/train/trainingProgram',
    method: 'put',
    data: data
  })
}

// 删除专业培养方案
export function delTrainingProgram(id) {
  return request({
    url: '/train/trainingProgram/' + id,
    method: 'delete'
  })
}

// 查询专业方案树
export function getTrainingProgramTree() {
  return request({
    url: '/train/trainingProgram/tree',
    method: 'get'
  })
}
